sentence = input("请输入一个英文句子:")
# sentence = "anxin anxin 123 123 456"
word_count = {}                                     #记录每个单词出现次数
words = sentence.split()                            #将句子拆分
for word in words:
    word_count[word] = word_count.get(word,0) + 1   #默认值初始化为0
    # print(word_count)
# print(word_count)
for word,count in word_count.items():
    print(f"{word}:{count}")














